/*********************************************************************
* File: engineApi.h
*
* \brief Implementation of Half-Life engine functions.
*
* \author Instituto Superior Tecnico de Lisboa, Portugal
* \author Technical University of Lisbon, Portugal
* 
* \author Agentes Autonomos e Sistemas Multiagente
* \author Autonomous Agents and Multiagent Systems
* 
* \version	1.0
* \date		2006/2007
*********************************************************************/
#pragma once

#include "engine.h"

//=============================================================================
// Global variables
//=============================================================================
extern int g_msgIndex;
extern int g_msgState;
extern void (*agentMsgFunction)(void *, int);

extern int message_VGUIMenu;
extern int message_ShowMenu;
extern int message_WeaponList;
extern int message_CurWeapon;
extern int message_AmmoX;
extern int message_AmmoPickup;
extern int message_Health;
extern int message_Battery;
extern int message_Damage;
extern int message_Money;
extern int message_StatusIcon;	// for buyzone, defuser, bombzone
extern int message_DeathMsg;
extern int message_ScreenFade;
extern int message_HLTV;
extern int message_TextMsg;

extern int message_SayText;

//=============================================================================
// Function Prototypes
//=============================================================================
void pfnChangeLevel(char* s1, char* s2);
edict_t* pfnFindEntityByString(edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue);
void pfnEmitSound(edict_t *entity, int channel, const char *sample, float volume, 
				  float attenuation, int fFlags, int pitch);
void pfnClientCommand(edict_t *pEdict, char *szFmt, ...);
void pfnMessageBegin(int msg_dest, int msg_type, const float *pOrigin, edict_t *ed);
void pfnMessageEnd(void);
void pfnWriteByte(int iValue);
void pfnWriteChar(int iValue);
void pfnWriteShort(int iValue);
void pfnWriteLong(int iValue);
void pfnWriteAngle(float flValue);
void pfnWriteCoord(float flValue);
void pfnWriteString(const char *sz);
void pfnWriteEntity(int iValue);
int pfnCmd_Argc(void);
const char *pfnCmd_Args(void);
const char *pfnCmd_Argv(int argc);
void pfnClientPrintf( edict_t* pEdict, PRINT_TYPE ptype, const char *szMsg );
void pfnSetClientMaxspeed(const edict_t *pEdict, float fNewMaxspeed);
int pfnRegUserMsg(const char *pszName, int iSize);
